<?php get_header() ?>

	<div id="container">
		<div id="content">

		<?php	 			$category = get_the_category();
								$args=array(
                                'showposts'=>1,
								'category__in'=>array($category[0]->cat_ID),
								);
                                query_posts($args);if ( have_posts() ) : while ( have_posts() ) : the_post();
								$postid = get_the_ID();
		?>

			<div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>">
				<h2 class="entry-title">
						<?php the_title() ?>
						<span class="entry-date"><abbr class="published"><?php the_time('Y-m-d') ?></abbr></span>
					<?php edit_post_link('Edit') ?>
				</h2>
				<div class="entry-content">
<?php the_content( __( 'Read More <span class="meta-nav">&raquo;</span>', 'sandbox' ) ) ?>

				<?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'sandbox' ) . '&after=</div>') ?>
				</div>
			</div><!-- .post -->

		<?php endwhile; endif; ?>
		<?php wp_reset_query(); ?>

		</div><!-- #content -->
		<ul id="thumbnail_box">
		<?php	 			$args=array(
                                'showposts'=>255,
								'category__in'=>array($category[0]->cat_ID),
								);
								$i=1;
                                query_posts($args);if ( have_posts() ) : while ( have_posts() ) : the_post();
								if($i==1){$i++;continue;};
		?>
			<li>
				<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
					<?php if ( has_post_thumbnail() ){the_post_thumbnail('thumbnail');}?>
					<?php the_title() ?>
					<span class="entry-date"><abbr class="published"><?php the_time('Y-m-d') ?></abbr></span>
				</a>
			</li>
		<?php endwhile; endif; ?>
		<?php wp_reset_query(); ?>

		</ul><!-- #thumbnail_box -->
	</div><!-- #container -->
<?php
global $post;
$myposts = get_posts('numberposts=1');
foreach($myposts as $post) :
	setup_postdata($post);
	if(	$post->ID == $postid){echo '<div class="new"></div>';}
endforeach;
?>
<?php get_sidebar() ?>
<?php get_footer() ?>